import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import legacyPlugin from '@vitejs/plugin-legacy';

// https://vitejs.dev/config/
export default defineConfig({
  base:'sys',
  plugins: [
    vue(),
    legacyPlugin({
      targets: ["chrome < 60", "edge < 15"], // 需要兼容的目标列表，可以设置多个
     additionalLegacyPolyfills: ["regenerator-runtime/runtime"], // 面向IE11时需要此插件
     renderLegacyChunks: true,
    })
  ],
  devServer: {
    proxy: {
      '/': {
        target: 'http://1.12.77.253:8080', // 后端接口地址
        changeOrigin: true,
        ws: true,
        pathRewrite: {
          '^/api': ''
        }
      }
    }
  }
})

